home *** CD-ROM | disk | FTP | other *** search
/ Die Speccy' 97 / Die Speccy' 97.iso / amiga_system / the_aminet / util / shell / smartfiles.lha / ReadMe.txt < prev    next >
Text File  |  1995-09-30  |  3KB  |  71 lines

  1.  
  2.   Here are two scriptfiles I use all the time in conjunction with my BBS.
  3. Doing something to four files in a directory is one thing; fifty or sixty or
  4. five hundred is another.
  5.  
  6.   The first is a "SmartDOS" file that does a string of commands to each file
  7. in a directory, one at a time.  It came from a script that converted LZH
  8. files to LHA, but it can be used for any set of commands that you could
  9. Execute from a scriptfile.
  10.  
  11.   The second is an ARexx file that takes a list of files and injects whatever
  12. you want in front of each filename and after each filename, so you end up
  13. with a file you can Execute that will perform the same function to each
  14. command.  It can also insert a different string between each line, such as a
  15. FailAt command. very important.
  16.  
  17.   
  18.   Example of the DOS file:
  19.  
  20.   You have a bunch of pictures you want to compress.  The SmartDOS scriptfile
  21. copies each pic to Ram, compresses it, then copies the LZX file back to the
  22. directory.  Simple!  You want to stuff some small ReadMe file in with each
  23. pic, no sweat.  This example comes to mind because I'm actually doing exactly
  24. that in the background as I type. :)
  25.  
  26.   My standard script for doing the above routine looks for the files to be in
  27. "XXX:", so before I start it up, I just Assign XXX: to whatever directory the
  28. files are in.  You can, of course, put actual paths in the scriptfile.
  29.  
  30.  
  31.   Example of the ARexx file:  
  32.  
  33.   I have a directory with 500 files in it, and a list of 250 files that I
  34. want to move into a neighboring directory.  Just to make it complicated,
  35. let's say there's some files on the list that aren't in the directory.  It's
  36. either look at the list and do the whole thing by hand, or...
  37.  
  38.   What we're going to do is stick a "Rename" in front of every file name on
  39. the list, and a destination path after it.  We also have to stick a "FailAt"
  40. in between each line to keep the scriptfile moving when it comes across a
  41. file it doesn't see in the directory.  We ReXecute the file and end up with:
  42.  
  43. FailAt 25
  44. Rename BIGFILE1.LZX Files:TempDir
  45. FailAt 25
  46. Rename BIGFILE2.LZX Files:TempDir
  47. FailAt 25
  48. Rename BIGFILE3.LZX Files:TempDir
  49. <etc>
  50.  
  51. Then you simply CD to the directory the files are in and Execute the file.
  52. Bang, all your 250 files are now moved.
  53.  
  54. The ARexx files was written by Asher Feldman, author of the excellent
  55. uuencoder/decoder "UUxT", a nice st-seq selector named "SLECT", a UNIX-like
  56. pipe: device named "PIP20", and possibly other fine products.  He can be
  57. reached at asher@shell.portal.com.
  58.  
  59.   Hope these help!
  60.  
  61.  
  62.                                **  THE BENCH//\/\\ASTER  **
  63.  
  64.  
  65.  
  66. Amiga-only BBS:
  67. (408) 238-5885
  68.  
  69. benchie@cup.portal.com
  70.  
  71.